package com.zhiche.lisa.bms.service.driver;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.bms.dao.model.driver.PriceconfOc;
import com.zhiche.lisa.bms.pojo.vo.driver.PriceconfOcVO;
import com.zhiche.lisa.core.supports.BaseException;
import org.springframework.validation.BindingResult;

import java.util.Date;

/**
 * <p>
 * 车型计价油耗 服务类
 * </p>
 *
 * @author zhaoguixin
 * @since 2018-08-30
 */
public interface IPriceconfOcService extends IService<PriceconfOc> {

    /**
     * 分页查询
     * @param page
     * @return
     */
    Page<PriceconfOcVO> listByPage(Page<PriceconfOcVO> page);

    /**
     * 添加
     * @param priceconfOcVO
     * @param br
     * @return
     */
    Integer add(PriceconfOcVO priceconfOcVO, BindingResult br);

    /**
     * 更新车型计价油耗
     * @param priceconfOcVO
     * @param br
     * @return
     */
    Boolean update(PriceconfOcVO priceconfOcVO,BindingResult br);

    /**
     * 删除车型计价油耗
     * @param id
     * @return
     * @throws BaseException
     */
    Boolean del(Integer id) throws BaseException;

    /**
     * 查询车型计价油耗
     * @param id
     * @return
     */
    PriceconfOcVO getById(Integer id);

    /**
     * 查询车型最新计价油耗
     * @param vehicleTypeId
     * @param effectiveDate
     * @return
     */
    PriceconfOc selectByEffectiveDateAndVehicleTypeId(Integer vehicleTypeId, Date effectiveDate);
}
